<template>
  <view class="my-search-container" :style="{backgroundColor:bgColor}" @click="searchBoxHandle()">
    <view class="my-search-box" :style="{borderRadius:radius+'px'}">
      <uni-icons type="search" size="17"></uni-icons>
      <text class="placeholder">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    props:{
      bgColor:{
        default:'#c00000',
        type:String,
      },
      radius:{
        default:18,//px
        type:Number,
      }
    },
    methods:{
      searchBoxHandle(){
        this.$emit('myeven',1)
      }
    }
  }
</script>

<style lang="scss">
  .my-search-container{
    height: 50px;
    // background-color: #c00000;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    .my-search-box{
      height: 36px;
      background-color: #fff;
      // border-radius: 18px;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      .placeholder{
        font-size: 15px;
        margin-left: 5px;
      }
    }
  }
</style>
